package com.jackson.Service.Impl;

import com.jackson.Dao.AccountDao;
import com.jackson.Service.AccountService;
import com.jackson.pojo.Account;

import java.util.List;

/*
 * Author: JacksonCoder
 * FileName: AccountServiceImpl
 * Version: 1.0.0
 */
public class AccountServiceImpl implements AccountService {

    private AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao){
        this.accountDao = accountDao;
    }

    @Override
    public List<Account> findAll() {
        return accountDao.findAll();
    }

    @Override
    public void delete(Integer id) {
        accountDao.delete(id);
    }

    @Override
    public void save(Account account) {
        accountDao.save(account);
    }

    @Override
    public Account findById(Integer id) {
        return accountDao.findById(id);
    }

    @Override
    public void update(Account account) {
        accountDao.update(account);
    }
}
